<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        class App {
            // name = '汽车';
            fn = () => {
                //这里的 this 一直指向实例对象
                console.log(this);
            }
        }

        function App(){
            
            this.fn = () => {

            }
        }

        let t = new App();
    </script>
</body>
</html>